/**
 * @param {number} shorter
 * @param {number} longer
 * @param {number} k
 * @return {number[]}
 */

 var divingBoard = function (shorter, longer, k) {
    if (k === 0) {
      return []
    }
    if (shorter === longer) {
      return [shorter * k]
    }
    let res = []
    for (let i = 0; i <= k; i++) {
      let shortCount = k - i
      let longerCount = i
      res.push(shortCount * shorter + longerCount * longer)
    }
    return res
  };